
import { useEditorStore } from "@/stores/editStore";
export function replaceSelectedText(editor:any,from:any,to:any,newText:any) {
    const editorStore = useEditorStore()
//   const { state, view } = editor;
  editor.commands.deleteRange({ from, to });
  editorStore.insertContext(newText)
}